<extend name="Layout:base_edit" />
<block name="body_content_block">
    <taglib name="Common\TagLib\Sohtml"/>
    <form action="{:U('Role/save_role_json')}" method="post">
        <table>
                <th>角色名称：</th>
                <td><input type="text" name="role_name" placeholder="角色名称" required="required" value="{$data.role_name}"/></td>
            </tr>
            <tr>
                <th>父级角色：</th>
                <td><input type="text" name="parent_id" id="parent_id" class="easyui-combobox" value="{$data.parent_id}" data-url="{:U('Role/get_role_tree_json')}"/></td>
            </tr>
            <tr>
                <th>状态：</th>
                <td><sohtml:radio name="state" items="1=正常;0=禁用" value="{$data.state|default=0}" /></td>
            </tr>
        </table>
        <input type="hidden" name="id" value="{$data.id}" />
    </form>  
</block>
<block name="body_after_block">
    <script type="text/javascript">        
        item_form.resize_owner_dialog({width:338});
        item_form.combobox('#parent_id', {url: $('#parent_id').data('url')}, '没有角色');
    </script>
</block>